﻿using Microsoft.Playwright;
using System.Threading.Tasks;

namespace StoreTools.Common
{
    public class Navigation
    {
        public Navigation(IPage page)
        {
            this.page = page;
        }

        IPage page;

        public async Task Click(string element)
        {
            await page.Locator(element).ClickAsync();
        }

        public async Task WaitUrl(string url)
        {
            await page.WaitForURLAsync(url);
        }

        public async Task Fill(string element,string text)
        {
            await page.Locator(element).FillAsync(text);
        }
    }
}
